finish=0
total =0
File.open('test.txt') do |f|
 f.each{ |line|
    tf, tt = line.scan(/\d+/)
    if tf != nil
        finish +=Integer(tf)
        total +=Integer(tt)
    end
    
    #puts "first is #{tf}, second is #{tt}"
 
 }
 
 puts "result is #{finish}/#{total}"
end

